package com.jlcloud.core.secure.handler;

import com.jlcloud.core.secure.interceptor.*;
import com.jlcloud.core.secure.props.AuthSecure;
import com.jlcloud.core.secure.props.BasicSecure;
import com.jlcloud.core.secure.props.JlCloudSecureProperties;
import com.jlcloud.core.secure.props.SignSecure;
import org.springframework.web.servlet.HandlerInterceptor;

import java.util.List;

/**
 * Secure处理器
 *
 * @author By: JlCloud <br>
 * @Package: com.jlcloud <br>
 * @CreateTime: 2024-12-03 21:45 <br>
 * @Copyright: 2021 www.jilianjituan.com Inc. All rights reserved. <br>
 * @Caution 注意：本内容仅限于冀联人力集团内部传阅，禁止外泄以及用于其他的商业目的 <br>
 */
public class SecureHandlerHandler implements ISecureHandler {

	@Override
	public HandlerInterceptor tokenInterceptor(JlCloudSecureProperties secureProperties) {
		return new TokenInterceptor(secureProperties);
	}

	@Override
	public HandlerInterceptor authInterceptor(JlCloudSecureProperties secureProperties, List<AuthSecure> authSecures) {
		return new AuthInterceptor(authSecures);
	}

	@Override
	public HandlerInterceptor basicInterceptor(List<BasicSecure> basicSecures) {
		return new BasicInterceptor(basicSecures);
	}

	@Override
	public HandlerInterceptor signInterceptor(List<SignSecure> signSecures) {
		return new SignInterceptor(signSecures);
	}

	@Override
	public HandlerInterceptor clientInterceptor(String clientId) {
		return new ClientInterceptor(clientId);
	}

}
